package com.yuxi;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author sunke
 * @version 1.0
 * @Description
 * @date 2023-10-13 10:08
 */
@SpringBootApplication
@MapperScan({"com.yuxi.dao.mapper", "com.yuxi.dao.mapperExt"})
@ServletComponentScan(basePackages = {"com.yuxi.filter"})
public class App {

    private static ApplicationContext applicationContext;


    public static ApplicationContext getApplicationContext() {
        return applicationContext;
    }

    public static void setApplicationContext(ApplicationContext applicationContext) {
        App.applicationContext = applicationContext;
    }

    public static void main(String[] args) {

        ConfigurableApplicationContext configurableApplicationContext = SpringApplication.run(App.class, args);


        App.setApplicationContext(configurableApplicationContext);


    }
}
